#version 330
layout (location=0) in vec3 position;
layout (location=1) in vec2 texCoord;
layout (location=2) in vec3 normal;
uniform mat4 projectMatrix;
uniform mat4 modelViewMatrix;

out vec3 mvNormal;
out vec2 v_texCoord;
out vec3 mvVertexPos;

void main()
{
    vec4 mvPos = modelViewMatrix * vec4(position,1.0);
    gl_Position = projectMatrix * mvPos;
    v_texCoord = texCoord;
    mvVertexPos = mvPos.xyz;
    mvNormal = normalize(modelViewMatrix * vec4(normal,0.0)).xyz;
}
